﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPages/AdminMasterPage.Master" CodeBehind="NewsEdit.aspx.vb" Inherits="LinhKienMayTinh.NewsEdit" %>
<%@ Register Src="~/WebControls/HtmlEditorControl.ascx" TagName="HtmlEditorControl" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPage" runat="server">
<div class="news-edit">
    <div class="button-div">
        <asp:Button ID="btnEdit" runat="server" Text="Edit" />
        <asp:Button ID="btnSave" runat="server" Text="Save" />
        
        <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
        <div style="float: right;">
            <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClientClick="return NewsEdit.DeleteConfirm();" />
            <asp:Button ID="btnAdd" runat="server" Text="Add new" />            
        </div>
        <br /><div class="error-state"><asp:Label ID="lbError" runat="server"></asp:Label></div>
    </div>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td class="column-1">
                Trạng thái delete
            </td>
            <td class="column-2">
                <asp:Label  ID="lbDel" runat="server" CssClass="del-label color-red"></asp:Label>
                <asp:Button ID="btnRestore" runat="server" Text="Khôi phục" />
            </td>
        </tr>
        <tr>
            <td class="column-1">
                Mã tin
            </td>
            <td class="column-2">
                <asp:TextBox ID="txtCode" runat="server" Width="15%" Enabled="false" CssClass="text-align-right"></asp:TextBox>                
            </td>
        </tr>
        <tr>
            <td class="column-1">
                Tựa đề
            </td>
            <td class="column-2">
                <asp:TextBox ID="txtTitle" runat="server" Width="90%" MaxLength="255"></asp:TextBox>
                <br /><asp:Label ID="lbErrorTitle" runat="server" CssClass="error-label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="column-1">
                Tag
            </td>
            <td class="column-2">
                <asp:TextBox ID="txtTag" runat="server" Width="90%" MaxLength="255"></asp:TextBox>
                <br /><asp:Label ID="lbErrorTag" runat="server" CssClass="error-label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="column-1">
                Hình ảnh
            </td>
            <td class="column-2">
                <asp:TextBox ID="txtFilePath" runat="server" Width="80%" CssClass="file-path"></asp:TextBox>                
                <asp:Button ID="btnBrowse" runat="server" CssClass="btn-browse" Text="..." OnClientClick="return false;" />
            </td>
        </tr>
        <tr>
            <td class="column-1 label-center" colspan="2">
                <br />Tóm tắt
            </td>            
        </tr>
        <tr>
            <td class="long-content" colspan="2">
                <div>
                    <% If ViewState(VIEW_MODE) = 0 Then%>
                        <div style="margin-left: 5px; margin-right: 5px;">
                            <asp:Literal ID="ltSummary" runat="server"></asp:Literal>
                        </div>
                    <%Else%>
                        <asp:TextBox runat="server" ID="txtSummary" TextMode="MultiLine" CssClass="textarea-control"></asp:TextBox>
                    <%End If%>
                </div>
            </td>            
        </tr>
        <tr>
            <td class="column-1 label-center" colspan="2">
                <br />Nội dung
            </td>            
        </tr>
        <tr>
            <td class="long-content" colspan="2">
                <div>
                    <% If ViewState(VIEW_MODE) = 0 Then%>
                        <div style="margin-left: 5px; margin-right: 5px;">
                            <asp:Literal ID="ltContent" runat="server"></asp:Literal>
                        </div>
                    <%Else%>
                        <uc:HtmlEditorControl ID="txtContent" runat="server" Height="800" />
                    <%End If%>                    
                </div>
            </td>            
        </tr>
    </table>
</div>
</asp:Content>
